using System.ComponentModel;

namespace ConsoleApi.Models;

/// <summary>
/// 天气数据模型
/// </summary>
public class WeatherData
{
    public string City { get; set; } = string.Empty;
    public CurrentWeather? Current { get; set; }
    public List<ForecastDay>? Forecast { get; set; }
    public DateTime LastUpdated { get; set; }
}

/// <summary>
/// 当前天气信息
/// </summary>
public class CurrentWeather
{
    public double Temp { get; set; }
    public string Text { get; set; } = string.Empty;
    public double WindSpeed { get; set; }
    public string WindDir { get; set; } = string.Empty;
    public int Humidity { get; set; }
    public double Pressure { get; set; }
    public double Vis { get; set; }
}

/// <summary>
/// 天气预报信息
/// </summary>
public class ForecastDay
{
    public DateTime Date { get; set; }
    public string Text { get; set; } = string.Empty;
    public double MinTemp { get; set; }
    public double MaxTemp { get; set; }
    public string WindDir { get; set; } = string.Empty;
    public double WindSpeed { get; set; }
    public int Humidity { get; set; }
    public int Precip { get; set; }
    public double Pressure { get; set; }
    public double Visibility { get; set; }
    public DateTime Sunrise { get; set; }
    public DateTime Sunset { get; set; }
}

/// <summary>
/// 生产活动模型
/// </summary>
public class ProductionActivity
{
    public string Id { get; set; } = string.Empty;
    public string Name { get; set; } = string.Empty;
    public string Type { get; set; } = string.Empty;
    public bool IsOutdoor { get; set; }
    public List<string> WeatherSensitiveConditions { get; set; } = new();
}

/// <summary>
/// 生产预警模型
/// </summary>
public class ProductionAlert
{
    public string Id { get; set; } = string.Empty;
    public string ActivityId { get; set; } = string.Empty;
    public string ActivityName { get; set; } = string.Empty;
    public string WeatherCondition { get; set; } = string.Empty;
    public double Temperature { get; set; }
    public AlertSeverity Severity { get; set; }
    public string Impact { get; set; } = string.Empty;
    public List<string> Recommendations { get; set; } = new();
    public DateTime CreatedAt { get; set; }
    public AlertStatus Status { get; set; }
}

/// <summary>
/// 天气影响分析模型
/// </summary>
public class WeatherImpactAnalysis
{
    public string City { get; set; } = string.Empty;
    public string ActivityType { get; set; } = string.Empty;
    public CurrentWeather? CurrentWeather { get; set; }
    public List<ForecastDay>? Forecast { get; set; }
    public List<ProductionAlert> Alerts { get; set; } = new();
    public RiskLevel RiskLevel { get; set; }
    public List<string> Recommendations { get; set; } = new();
    public DateTime AnalysisTime { get; set; }
}

/// <summary>
/// 天气趋势模型
/// </summary>
public class WeatherTrend
{
    public DateTime Date { get; set; }
    public double TemperatureChange { get; set; }
    public string Trend { get; set; } = string.Empty;
}

/// <summary>
/// 生产建议模型
/// </summary>
public class ProductionRecommendation
{
    public string ActivityType { get; set; } = string.Empty;
    public List<string> Recommendations { get; set; } = new();
    public RiskLevel RiskLevel { get; set; }
    public DateTime GeneratedAt { get; set; }
}

/// <summary>
/// 预警严重程度枚举
/// </summary>
public enum AlertSeverity
{
    None = 0,
    Low = 1,
    Medium = 2,
    High = 3,
    Critical = 4
}

/// <summary>
/// 预警状态枚举
/// </summary>
public enum AlertStatus
{
    Active = 0,
    Acknowledged = 1,
    Resolved = 2,
    Dismissed = 3
}

/// <summary>
/// 风险等级枚举
/// </summary>
public enum RiskLevel
{
    None = 0,
    Low = 1,
    Medium = 2,
    High = 3,
    Critical = 4
} 